<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<%@ page import="org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter" %>
<%@ page import="org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter" %>
<%@ page import="org.springframework.security.web.WebAttributes" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>d-Magic CMS Login</title>
<%@ include file="/common/meta.jsp" %>
<%@ include file="/common/initCss.jsp" %>
<%@ include file="/common/initJs.jsp" %>
</head>
<body id="login">
<div id="login-wrapper" class="png_bg">
  <div id="login-top">
    <h1>d-Magic CMS Login</h1>
    <!-- Logo (221px width) -->
    <a href="#"><img id="logo" src="${ctx}/images/logo.png" alt="Simpla Admin logo" /></a> </div>
  <!-- End #logn-top -->
  <div id="login-content">
    <form id="login-form" action="${ctx}/j_spring_security_check" method="post">
        <%
			if (session.getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION) != null) {
		%> 
      <div class="notification information png_bg">
        <div> 登录失败，请重试. </div> 
      </div>
		<%
			}
		%>
      <p>
        <label>Username</label>
        <input class="text-input required" type="text"  id='j_username' name='j_username' />
      </p>
      <div class="clear"></div>
      <p>
        <label>Password</label>
        <input class="text-input required"  type="password"  id='j_password'  name='j_password' />
      </p>
      <div class="clear"></div>
      <p id="remember-password">
        <input type="checkbox" name="_spring_security_remember_me"/>
        Remember me &nbsp;&nbsp;&nbsp;&nbsp;
        <input class="button" type="submit" value="Sign In" /></p>
      <div class="clear"></div>
    </form>
  </div>
  <!-- End #login-content -->
</div>
<!-- End #login-wrapper -->
	<script src="${ctx}/extends/jquery-validation/1.10.0/jquery.validate.min.js" type="text/javascript"></script>
	<script src="${ctx}/extends/jquery-validation/1.10.0/messages_bs_zh.js" type="text/javascript"></script>
	<script>
		$(document).ready(function() {
			$("#login-form").validate();
		});
	</script>
</body>
</html>
